class CMyComClassFactory : public IClassFactory
{
public:
    CMyComClassFactory();
    virtual ~CMyComClassFactory();

    // IUnknown
    STDMETHOD_(ULONG, AddRef)();
    STDMETHOD_(ULONG, Release)();
    STDMETHOD(QueryInterface)(REFIID riid, void** ppv);

    // IClassFactory
    STDMETHOD(CreateInstance)(IUnknown* pUnkOuter, REFIID riid, void** ppv);
    STDMETHOD(LockServer)(BOOL bLock);

protected:
    ULONG RefCount;
};